package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.entity.R;
import com.itheima.reggie.entity.ShoppingCart;

/**
 * <b><code>IShoppingCartService</code></b>
 * <p/>
 * Description
 * <p/>
 * <b>Creation Time:</b> 29/06/2024 18:35.
 *
 * @author yanjr
 * @since reggie_take_out
 */
public interface IShoppingCartService extends IService<ShoppingCart> {
    /**
     * 添加购物车
     * @param shoppingCart 购物车信息
     * @return 购物车信息
     */
    ShoppingCart add(ShoppingCart shoppingCart);

    /**
     * 购物车数量减1
     * @param shoppingCart 购物车信息
     * @return 是否成功
     */
    R<ShoppingCart> sub(ShoppingCart shoppingCart);
}
